<?php
class dashboard extends MY_Controller{
	
	protected $title;
	
	function __construct(){
		parent::__construct();
	}
	
	function index(){
		$this->dash();
	}
	
	function dash(){
		$this->title = "Komputek";
		
		/*
		 * load header
		 */
		$header = $this->config->item("header");
		$header = $this->load->view("dashboard/main/finalizeView/header",$header,true);
		
		/*
		 * load content
		 */
		$content = $this->config->item("content");
		$content['title'] = "Dashboard";
		$content['w_lpanel'] = "10%";
		$content['w_main'] = "80%";
		$content['w_rpanel_main'] = "50%";
		$content['w_lpanel_main'] = "50%";
		$query = array(
					'title'=>$content['title'],
				);
		$content['lpanel'] = $this->load->view('dashboard/main/content/lpanel','',true);
		$content['main'] = $this->load->view('dashboard/main/content/dashboard/main',$query,true);
		$content['lpanel_main'] = $this->load->view('dashboard/main/content/dashboard/lpanel','',true);
		$content['rpanel_main'] = $this->load->view('dashboard/main/content/dashboard/rpanel','',true);
		$content = $this->load->view("dashboard/main/finalizeView/content",$content,true);
		
		/*
		 * load footer
		 */
		$footer = $this->config->item("footer");
		$footer = $this->load->view("dashboard/main/finalizeView/footer",$footer,true);
		
		/*
		 * finalize view
		 */
		$jscript = array();
		$css = array('pages');
		$page = $this->config->item("page");
		$page['title'] = $page['title']." - ".$this->title;
		$this->finalizeViewAdmin(array(
			'title'=>$page['title'],
			'jscript_add'=>js_script($jscript),
			'css_add'=>css_script($css),
    		'jscript'=>js_script($page['jscript_default']),
    		'css'=>css_script($page['css_default']),
			'header'=>$header,
    		'content'=>$content,
			'footer'=>$footer,
			'layout_width'=>950,
			
		));
	}
	
}